exchange 2007  shell expression needs correction please help
We are on exchange 2007 SP1. I am running the below expression on the exchange command shell. Get-Mailbox | foreach-object{$mbDN = $_.distinguishedname; Add-ADPermission -identity $mbDN -User DOMAIN\User-ExtendedRights Send-as} the command runs without any errors but I get a warning saying "By default only the first 1000 items are returned, to change the number of items returned, specify the parameter "-ResultSize". To return all items specify "-ResultSize Unlimited". Kindly advise on how I can incorporate "-ResultSize Unlimited" into the expression. Get-Mailbox | foreach-object{$mbDN = $_.distinguishedname; Add-ADPermission -identity $mbDN -User DOMAIN\User-ExtendedRights Send-as} Thanks in advance.
September 21st, 2012 5:54am

Try like this but you will add send permissions to all mailboxes: Get-Mailbox -ResultSize unlimited | foreach-object {$mbDN = $_.distinguishedname; Add-ADPermission -identity $mbDN -User DOMAIN\User-ExtendedRights Send-as} but maybe better to add permission to Database ? check this http://social.technet.microsoft.com/forums/en-US/exchangesvradmin/thread/5a7b025c-8902-4e19-a99a-e1cef8de9efa/ Regards Remigiusz ExchangeBlog
Free Windows Admin Tool Kit Click here and download it now
September 21st, 2012 8:27am

Hi The above command should work "Get-Mailbox" will return all mailboxes, so the place to add "-ResultSize Unlimited" will be after "Get-Mailbox" CheersZi Feng TechNet Community Support
September 24th, 2012 3:57am

Hi The above command should work "Get-Mailbox" will return all mailboxes, so the place to add "-ResultSize Unlimited" will be after "Get-Mailbox" CheersZi Feng TechNet Community Support
Free Windows Admin Tool Kit Click here and download it now
September 24th, 2012 4:21am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics